<template>
  <div class="login-page">
    <div class="left-side">
      <div class="background-image"></div>
      <!-- 圆角矩形背景图 -->
    </div>
    <div class="right-side">
      <h1>注册账号</h1>
      <form>
        <!-- 用户名 -->
        <div class="form-group">
          <label for="username">用户名</label>
          <input type="text" id="username" placeholder="请输入用户名" />
        </div>

        <!-- 密码 -->
        <div class="form-group">
          <label for="password">密码</label>
          <input type="password" id="password" placeholder="请输入密码" />
        </div>

        <!-- 确认密码 -->
        <div class="form-group">
          <label for="confirm-password">确认密码</label>
          <input type="password" id="confirm-password" placeholder="确认密码" />
        </div>

        <!-- 选项部分 -->
        <div class="options">
          <button type="submit">注册</button>
          <div class="right-options">
            <span>|</span>
            <router-link to="/login">已有账号？登录</router-link>
          </div>
        </div>
      </form>
    </div>
  </div>
</template>

<script>
export default {
  name: "RegisterPage",
};
</script>

<style scoped>
/* 保持与登录页面一致的样式 */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.login-page {
  display: flex;
  height: 98vh;
  overflow: hidden;
}

/* 左侧 */
.left-side {
  flex: 1;
  background-color: #f0f0f0;
  position: relative;
}

.background-image {
  background-image: url("@/assets/images/1.png");
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* 右侧 */
.right-side {
  width: 20%;
  background-color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
}

/* 标题 */
h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* 表单部分 */
.form-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 15px;
}

.form-group label {
  width: 30%;
  margin-right: 5px;
  font-weight: bold;
}

input[type="text"],
input[type="password"] {
  width: 60%;
  margin-left: 1px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* 注册按钮 */
button {
  width: 30%;
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 15%;
  margin-bottom: 10px;
}

button:hover {
  background-color: #0056b3;
}

/* 选项部分 */
.options {
  display: flex;
  justify-content: space-between;
  margin-left: 15%;
}

.left-options {
  display: flex;
  align-items: center;
}

.left-options label {
  margin-left: 5px;
}

.right-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.right-options a {
  text-decoration: none;
  color: #007bff;
  margin-left: 10px;
}

.right-options a:hover {
  text-decoration: underline;
}

.right-options span {
  margin: 0 10px;
}
</style>
